<?php
/**
 * display.class.php
 * 
 * directory:	includes/classes/
 * author:		wil hamilton <wil.hamilton@gmail.com>
 * written:		april 5, 2008, april 9, 2008
 * updated:		
 *
 * purpose:		
 *
 * display somethings
 *
 */
 
class display {
	
	#display a redirect message
	public static function redirect($message, $url = ROOT_URL)
	{
		return '<h1>Redirecting...</h1>
		        <p>' .$message . ' <a href="'. $url.'">Click here to continue.</a></p>';
	}
	
	#display a link
	public static function link($title, $anchor = "")
	{
		return '<a href="' . ROOT_URL . URL_BASE . $anchor . '">' . $title . '</a>';
	}
	
	public static function dateHeader($date)
	{
		return '<h3 class="date">'.format::date($date) . '</h3>';
	}
	
	#depreceated
	public static function h2($content)
	{
		return '<h2>' . stripslashes($content) . '</h2>';
	}
	
	public static function header($content)
	{
		return '<h2>' . $content . '</h2>';
	}
	
	public static function subHeader($content)
	{
		return '<h3>' . $content . '</h3>';
	}
	
	public static function headerLink($title, $anchor = "")
	{
		return '<h2><a href="' . ROOT_URL . URL_BASE . $anchor . '">' . stripslashes($title) . '</a></h2>';
	}
	
	#display a DNE error
	public static function itemDNE($item = 'item')
	{
		return '<h2>' . ucfirst($item) . ' Not found</h2>
		        <p>Sorry, but the ' . $item . ' you were looking for does not seem to exist.  If you continue to see this error, please contact the site administrator.</p>';
	}
	
	#display a 404 error
	public static function error404()
	{
		return '<h2>404 - Not Found</h2>
		        <p>Sorry, but the page you were looking for does not seem to exist.  If you continue to see this error, please contact the site administrator.</p>';
	}

}
?>